// 页面切换逻辑
const tabUpload = document.getElementById('tab-upload');
const tabCamera = document.getElementById('tab-camera');
const pageUpload = document.getElementById('page-upload');
const pageCamera = document.getElementById('page-camera');

tabUpload.addEventListener('click', () => {
    // 切换选项卡样式
    tabUpload.classList.remove('tab-inactive');
    tabUpload.classList.add('tab-active');
    tabCamera.classList.remove('tab-active');
    tabCamera.classList.add('tab-inactive');

    // 切换页面显示
    pageUpload.classList.remove('hidden');
    pageCamera.classList.add('hidden');

    // 添加淡入动画
    pageUpload.classList.add('fade-in');
    setTimeout(() => {
        pageUpload.classList.remove('fade-in');
    }, 500);
});

tabCamera.addEventListener('click', () => {
    // 切换选项卡样式
    tabCamera.classList.remove('tab-inactive');
    tabCamera.classList.add('tab-active');
    tabUpload.classList.remove('tab-active');
    tabUpload.classList.add('tab-inactive');

    // 切换页面显示
    pageCamera.classList.remove('hidden');
    pageUpload.classList.add('hidden');

    // 添加淡入动画
    pageCamera.classList.add('fade-in');
    setTimeout(() => {
        pageCamera.classList.remove('fade-in');
    }, 500);
});
// 上面是选项卡切换功能